Skip to content

Conversation

@tconley1428
Copy link
Contributor

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

/// <summary>
/// Placeholder.
/// </summary>
internal class RootPlugin : Plugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would recommend making this implement the interface w/ a throw NotImplementedException for init


public TemporalClientOptions OnCreateClient(TemporalClientOptions options);

public Task<TemporalConnection> TemporalConnectAsync(TemporalClientConnectOptions options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would call this ClientConnectAsync and other ClientCreateLazy

Comment on lines +13 to +14
private IWorkerPlugin? nextWorkerPlugin;
private IClientPlugin? nextClientPlugin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would recommend these be protected properties, and that they return non-null values and fail if the backing fields are null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would not recommend putting this in the Interceptors namespace, and would recommend calling this ITemporalClientPlugin (same two things for worker side)


namespace Temporalio.Common
{
public class Plugin : IClientPlugin, IWorkerPlugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark all methods here as virtual

Comment on lines +158 to +161
public new async Task<TemporalConnection> TemporalConnectAsync(TemporalClientConnectOptions options)
{
return await TemporalConnection.ConnectAsync(options).ConfigureAwait(false);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public new async Task<TemporalConnection> TemporalConnectAsync(TemporalClientConnectOptions options)
{
return await TemporalConnection.ConnectAsync(options).ConfigureAwait(false);
}
public Task<TemporalConnection> TemporalConnectAsync(TemporalClientConnectOptions options) =>
TemporalConnection.ConnectAsync(options);

Pedantic shortcut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants